package com.tanie.fenxiao.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "admin")//获取表名，由于在entity类中都用的就不细说
public class Admin extends BaseBean implements Serializable {
	private static final long serialVersionUID = 1L;
	private String name;//名称
	private String password;//密码
	private Integer status;//状态
//管理员相关属性的实体类
	@Column(columnDefinition = "int default 0", name = "juri", nullable = false)
	//@Column标记表示所持久化属性所映射表中的字段
	private int juri;

	@Temporal(TemporalType.TIMESTAMP)
	//@Temporal(TemporalType.TIMESTAMP) 会得到形如'HH:MM:SS' 格式的日期
	private Date lastLoginTime;//最后登录时间
	private String lastLoginIp;//最后登陆ip
	private Integer loginCount;//登陆次数

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getLastLoginTime() {
		return this.lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getLastLoginIp() {
		return this.lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}

	public Integer getLoginCount() {
		return this.loginCount;
	}

	public void setLoginCount(Integer loginCount) {
		this.loginCount = loginCount;
	}

	public int getJuri() {
		return this.juri;
	}

	public void setJuri(int juri) {
		this.juri = juri;
	}
}
